Aster: Automatic Abstract Syntax
نویسنده
چکیده
Modern parser generators typically require two components: an abstract syntax data structure and a concrete syntax grammar specification. Usually the abstract syntax and the concrete syntax are closely related but are specified independently because it is difficult to distinguish what parts of the concrete syntax are associated with the abstract syntax. There are a few add-ons to parser generators, such as ANTLR, which allow the programmer to specify this relationship through annotations in the concrete syntax, but their scope is limited. In this honors thesis, I propose a new way of generating the abstract syntax data structure. The concrete syntax grammar is used as a base for the abstract syntax data structure. The grammar undergoes a series of transformations, where each transformation analyzes the grammar and removes excess information, such as precedence, associativity, or literals used only to disambiguate potential parsings. The final result is an abstract syntax data structure. In addition, since each of these transformations can be linked together, parser actions can be inserted into the original grammar so that an abstract syntax tree is created when the generated parser is run.
منابع مشابه
Abstract Syntax Networks for Code Generation and Semantic Parsing
Tasks like code generation and semantic parsing require mapping unstructured (or partially structured) inputs to well-formed, executable outputs. We introduce abstract syntax networks, a modeling framework for these problems. The outputs are represented as abstract syntax trees (ASTs) and constructed by a decoder with a dynamically-determined modular structure paralleling the structure of the o...
متن کاملParsing Strings and Trees with Parse::Eyapp (An Introduction to Compiler Construction)
Parse::Eyapp (Extended yapp) is a collection of modules that extends Francois Desarmenien Parse::Yapp 1.05. Eyapp extends yacc/yapp syntax with functionalities like named attributes, EBNF-like expressions, modifiable default action, automatic syntax tree building, semi-automatic abstract syntax tree building, translation schemes, tree regular expressions, tree transformations, scope analysis su...
متن کاملAutomatic conversion of Indian Language Morphological Processors into Grammatical Framework (GF)
Grammatical framework (GF) is an open source software which supports semantic abstraction and linguistic generalization in terms of abstract syntax in a multilingual environment. This makes the software very suitable for automatic multilingual translation using abstract syntax which can be treated as a interlingua. As a first step towards building multi-Indian language translation system using ...
متن کاملVerifying Modelling Languages using Lightning: a Case Study
The formal language Alloy was developed to provide fully automatic analysis of software designs. By providing immediate feedback to users it allows early detection of design errors. The main goal of the Lightning tool is to apply the power of Alloy’s automatic analysis to the domain of software language engineering. The tool allows to represent abstract syntax, concrete syntax and semantics of ...
متن کامل